package Demo04;

import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.interceptor.ServletRequestAware;

import javax.servlet.Servlet;
import javax.servlet.http.HttpServletRequest;
        //接口实现获取request对象
public class UserAction_InterImpl extends ActionSupport implements ServletRequestAware {
    private HttpServletRequest request;
    @Override
    public void setServletRequest(HttpServletRequest httpServletRequest) {
        this.request=httpServletRequest;
    }

            @Override
            public String execute() throws Exception {
                String s= request.getParameter("username");
                String s1= request.getParameter("password");
                System.out.println(s+"  + "+s1);
               return NONE;
            }
        }
